import { createStore, combineReducers, Store } from 'redux';
import { ActionTypes } from './action.types';


const rootReducer = combineReducers({
    root: function(state: string = 'root', action): string {
        switch( action.type ) {
            case ActionTypes.CLICK: return action.payload;
        }
        return state;
    }
})


const store: Store = createStore(
    rootReducer
);

export default store;